package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @GoodsUnit
 * @商品价格(goods_unit)
 * @version : Ver 1.0
 */
@Entity
public class GoodsUnit implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:提现
	 * @字段:id BIGINT(19)
	 */
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	@GenericGenerator(name="auto-identity",strategy="identity")
	@Column(updatable = false, columnDefinition="BIGINT(19) COMMENT '提现'")
	private java.lang.Long id;

	/**
	 * @备注:商品id
	 * @字段:goods BIGINT(19)
	 */
	@ManyToOne
	@JoinColumn(name="goods", columnDefinition="BIGINT(19) COMMENT '商品id'")
	private Goods goods;

	/**
	 * @备注:商品规格
	 * @字段:unit_standard VARCHAR(66)
	 */
	@Column(columnDefinition="VARCHAR(66) COMMENT '商品规格'")
	private java.lang.String unitStandard;

	/**
	 * @备注:商品数量
	 * @字段:unit_num VARCHAR(33)
	 */
	@Column(columnDefinition="VARCHAR(33) COMMENT '商品数量'")
	private java.lang.String unitNum;

	/**
	 * @备注:单价价格
	 * @字段:unit_price DOUBLE(22)
	 */
	@Column(columnDefinition="DOUBLE(22) COMMENT '单价价格'")
	private java.lang.Double unitPrice;

	/**
	 * @备注:市场价
	 * @字段:market_price DOUBLE(22)
	 */
	@Column(columnDefinition="DOUBLE(22) COMMENT '市场价'")
	private java.lang.Double marketPrice;

	/**
	 * @备注:状态,1表示正常,2表示下架
	 * @字段:status VARCHAR(33)
	 */
	@Column(columnDefinition="int COMMENT '状态,1表示正常,2表示下架'")
	private java.lang.Integer status;

	/**
	 * @备注:
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@Column(updatable = false, columnDefinition="DATETIME(19) COMMENT ''")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime = new java.util.Date();

	/**
	 * @备注:
	 * @字段:upt_datetime DATETIME(19)
	 */
	@Column(columnDefinition="DATETIME(19) COMMENT ''")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime = new java.util.Date();

	public GoodsUnit(){
	}

	public GoodsUnit(
		java.lang.Long id
	){
		this.id = id;
	}



	public void setId(java.lang.Long id) {
		this.id = id;
	}

	public java.lang.Long getId() {
		return this.id;
	}


	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public void setUnitStandard(java.lang.String unitStandard) {
		this.unitStandard = unitStandard;
	}

	public java.lang.String getUnitStandard() {
		return this.unitStandard;
	}


	public void setUnitNum(java.lang.String unitNum) {
		this.unitNum = unitNum;
	}

	public java.lang.String getUnitNum() {
		return this.unitNum;
	}


	public void setUnitPrice(java.lang.Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public java.lang.Double getUnitPrice() {
		return this.unitPrice;
	}


	public void setMarketPrice(java.lang.Double marketPrice) {
		this.marketPrice = marketPrice;
	}

	public java.lang.Double getMarketPrice() {
		return this.marketPrice;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}
}
